<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        .box {
            display: flex;

            flex-direction: row; /**  横向排列**/

            /**  flex-direction: column ; 竖向排列**/

            /**  flex-direction: row-reverse ; 横向反排列**/

            /**  flex-direction: column-reverse; 竖向反排列**/

        }

        div {
            margin: 30px;
            padding: 25px;
        }

        .item1 {
            background: red;
        }

        .item2 {
            background: yellow;
        }

        .item3 {
            background: blue;
        }
    </style>
</head>
<body>
<div class="box">
    <div class="item1">1</div>
    <div class="item2">2</div>
    <div class="item3">3</div>

</div>
</body>
</html>